package oop8;

/**
 * @author oldliu
 * @since 1.0
 */
//圆
public class Circle extends Shape {
    //静态常量一般是大写
    public static final double PI=3.14;
    private double r;
    public Circle(double r ){
        this.r=r;
    }
    @Override
    public double calcPerimeter() {
        return 2*PI*r;
    }

    @Override
    public double calcArea() {
        return PI*r*r;
    }

    @Override
    public String toString() {
        return "这是一个圆，半径是"+r;
    }
}
